注册 登录
中国神经科学论坛 返回首页

thinker的个人空间 https://bbs.bioguider.com/?2 [收藏] [复制] [分享] [RSS]

日志

Matlab常用代码

已有 851 次阅读2008-10-4 14:07 |个人分类:软件使用|

1. 把变量用指定的名字保存到指定的路径,代码如下:

save([pathname 'filename.mat']);

2. 用指定的名字批量保存FIGURE到指定的路径,代码如下:

% save all figures in different names
ChildList = sort(get(0,'Children'));
for cnum = 1:length(ChildList)
if strncmp(get(ChildList(cnum),'Type'),'figure',6)
saveas(ChildList(cnum), [pathname 'filename', '_', num2str(ChildList(cnum)), '.' 'fig']);
end
end


路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

小黑屋|手机版|Archiver|生物行[生物导航网] ( 沪ICP备05001519号 )

GMT+8, 2024-5-19 03:33 , Processed in 0.016428 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

返回顶部